from flask import Blueprint
from flask_restful import Api

api_bp = Blueprint('api.v1', __name__, url_prefix='/api/v1')  # 添加路由前缀
api = Api(api_bp)


# 统一返回值
def get_result(code=200, data=[], msg='ok'):
    result = {
        'code': code,
        'data': data,
        'msg': msg
    }
    return result


# 加载所有资源模块
from apps.api.v1.user import user_resource
